package com.ruoyi.hk.mapper;

import java.util.List;
import com.ruoyi.hk.domain.DocDoctorRegist;
import com.ruoyi.hk.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 医生审核Mapper接口
 * 
 * @author ruoyi
 * @date 2025-08-16
 */
@Mapper
public interface DocDoctorRegistMapper 
{
    /**
     * 查询医生审核
     * 
     * @param doctorRegistId 医生审核主键
     * @return 医生审核
     */
    public DocDoctorRegist selectDocDoctorRegistByDoctorRegistId(Long doctorRegistId);

    /**
     * 查询医生审核列表
     * 
     * @param docDoctorRegist 医生审核
     * @return 医生审核集合
     */
    public List<DocDoctorRegist> selectDocDoctorRegistList(DocDoctorRegist docDoctorRegist);

    /**
     * 新增医生审核
     * 
     * @param docDoctorRegist 医生审核
     * @return 结果
     */
    public int insertDocDoctorRegist(DocDoctorRegist docDoctorRegist);

    /**
     * 修改医生审核
     * 
     * @param docDoctorRegist 医生审核
     * @return 结果
     */
    public int updateDocDoctorRegist(DocDoctorRegist docDoctorRegist);

    /**
     * 删除医生审核
     * 
     * @param doctorRegistId 医生审核主键
     * @return 结果
     */
    public int deleteDocDoctorRegistByDoctorRegistId(Long doctorRegistId);

    /**
     * 批量删除医生审核
     * 
     * @param doctorRegistIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDocDoctorRegistByDoctorRegistIds(Long[] doctorRegistIds);

    /*User selectUserAndDoctorResigt(DocDoctorRegist docDoctorRegist);*/
    DocDoctorRegist selectUserAndDoctorResigt(DocDoctorRegist docDoctorRegist);

    @Insert("insert into sys_user_role values (#{userId},#{userType})")
    Integer confirmAudit(@Param("userId") Long userId,@Param("userType") String userType);

    @Insert("update doc_doctor_regist set audit_state = #{auditState},audit_time = #{auditTime}")
    void updateNewDoctoRegist(DocDoctorRegist docDoctorRegist);
}
